package bean;

import java.util.Map;
import java.util.Set;

import org.springframework.beans.factory.BeanNameAware;

public class JohnBean implements BeanNameAware {
	private String uname ;
	private TomBean tb ;
	private Map<String,String> tels ;
	
	public void init(){
		System.out.println("JohnBean init......");
	}
	
	@Override
	public void setBeanName(String name) {
		this.uname = name;
	}
	public void setName(String name) {
		this.uname = name;
	}
	public void setTb(TomBean tb){
		this.tb = tb ;
	}
	public void setTels(Map<String,String> tels){
		this.tels = tels ;
	}
	public JohnBean(){
		System.out.println("JohnBean......");
	}
	public JohnBean(String name){
		this.uname = name;
	}
	public void say(){
		System.out.println(tels.getClass().getName());
		for(String key : tels.keySet()){
			System.out.println(key + ":" + tels.get(key));
		}
	}
}
